home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MIDICraft's MIDINET CD-ROM
/
MIDICraft's MIDINET CD-ROM.iso
/
DOSUTILS
/
MIDIDRUM.DOC
< prev
next >
Wrap
Text File
|
1997-03-04
|
7KB
|
180 lines
******************************
MIDIDRUM v1.5
split drum instruments of midi binaries
by Guenter Nagler
1995
(gnagler@ihm.tu-graz.ac.at)
******************************
[0] FEATURES
+ reads a binary midi file of format 0 or 1
+ writes a binary midi file of format 1
+ scans midi for drum instruments that are used
+ copies tracks that are not drums
+ generate a track for each used drum instrument
+ copy drum notes and assigns controls that were used in original
drum tracks.
+ split tracks that play more than one program into tracks that play
only one program per channel per track (option -program)
+ split optionally drum tracks or program tracks (use options)
[1] BACKGROUND
A cakewalk expert posted a cakewalk macro program (.CAL) in
newsgroup alt.binaries.sounds.midi . I found that the idea of this program
very good to learn new drum patterns. It is difficult to get an overview
about a drum pattern when all drum instruments are mixed. It is also difficult
to recognize which drum notes play which instruments.
I am not a cakewalk user so I was not able to use the program, so I decided
to program an own program that splits the drums.
[2] FILES DESCRIPTION
MIDIDRUM.EXE.........converter program
MIDIDRUM.DOC.........this file, showing usage of MIDIDRUM.EXE
MIDIIO.HPP...........header file for a c++ midi parser
MIDIIO.CPP...........source code for a c++ midi parser
MIDIDRUM.CPP.........c++ source code for midi to text
MIDIDRUM.MAK.........make file for project
MIDIDRUM.CFG.........compiler options for make
MIDIDRUM.PRJ.........compiler project for borland c++ compilers
only MIDIDRUM.EXE is required to run program
[3] COPYRIGHT
MIDIDRUM (c) 1995 was created by Guenter Nagler.
MIDIDRUM is free and may be used as you wish with this one exception:
You may NOT charge any fee or derive any profit for distribution
of MIDIDRUM. Thus, you may NOT sell or bundle MIDIDRUM with any
product in a retail environment (shareware disk distribution, CD-ROM,
etc.) without permission of the author.
You may give MIDIDRUM to your friends, upload it to a BBS, or ftp it to
another internet site, as long as you don't charge anything for it.
[4] DISCLAIMER
MIDIDRUM was designed to handle 100% compatible general midi files.
The midi parser was tested with 1000 different midi files but
I can not say if each 100% midi compatible midi file can be correctly
converted. So I give no guarantees of the results, especially with non 100%
compatible midi files.
If you find a midi file that you think to be 100% compatible midi
that is not correctly converted, please send a sample file to
gnagler@ihm.tu-graz.ac.at .
Use MIDIDRUM at your own risk. Anything you do with MIDIDRUM is your
responsibility, and not the author's. Any damage caused to any person,
computer, software, hardware, company, or business by running MIDIDRUM
is your responsibility, and the author will not be liable.
If you don't understand these terms, or are not sure of something, or
are afraid something bad might come of using MIDIDRUM, don't use it!
You are here forewarned.
[5] INSTALLATION
[MSDOS]
Simply copy MIDIDRUM.EXE in a directory that is in your path.
When you start the program without arguments
[UNIX]
compile sources with your C++ compiler (e.g. GNU Compiler g++):
g++ -o mididrum mididrum.cpp midiio.cpp
and run program
$ mididrum
C:\> MIDIDRUM
you should get the usage text (see next section)
[6] USAGE
usage: mididrum [-drum][-program][-both] srcfile.mid dstfile.mid
splits drum instruments into separate tracks
This program only accepts format 0 and 1 midi files.
-version get program version
-drum split drum tracks by drum instruments
-program split non-drum tracks by programs
-both split drums and programs
Format 0 midi files (1 track) can only be splitted with option -both
MIDIDRUM assumes that only channel 10 tracks contain drums (General Midi).
The resulting drum tracks are set to channel 10 (GM).
Warning:
If splitting a midi file format 0 file then option -both is automatically
activated!
Warning:
MIDIDRUM could split a midi file into many tracks, but some weak midi
players ignore last tracks if exceeding a certain limit (e.g. 16 tracks).
[8] SUGGESTIONS / COMMENTS / BUG REPORTS / QUESTIONS
WWW: http://hgiicm.tu-graz.ac.at/Cpub
contains all my dos/unix midi programs
EMAIL: gnagler@ihm.tu-graz.ac.at
[9] SAMPLES
MIDIDRUM accepts only format 0 or 1 midi files.
When trying to split any other format it says:
command> mididrum sample2.mid splitdrm.mid
sample2.mid is format 2. This program only accepts format 0 or 1.
MIDIDRUM does not convert a midi file to the same filename:
command> mididrum sample1.mid sample1.mid
cannot convert midi to same file
Warning: Be sure to use a new output filename. MIDIDRUM will overwrite
existing files!
When the midi file is valid and it is of format 0 or 1 it converts the file:
command> mididrum sample1.mid splitdrm.mid
10% (counts from 0% to 100%)
output written to splitdrm.mid
Splitting only programs of a format 1 midi file:
command> mididrum -program sample1 splitprg.mid
output written to splitprg.mid
The programs are separated in own tracks, the drums remain in tracks
as used in original file.
Hint: use midifmt or mididir to get information about midi format
[10] CHANGES
v1.0 to v1.1:
* fixed bug that caused segmentation fault/stack overflow
* prevents from writing multiple end of track commands
v1.1 to v1.2:
* added option -program to split tracks that change programs during playing
into multiple tracks playing only one program
* added option -version
* allow splitting midi format 0 track (automatically sets option -program)
the result is a midi file format 1 containing many tracks
(one per program/channel and one per drum instrument)
v1.2 to v1.3:
* used updated midiio
* convertion of files with many tracks (e.g. 130) caused assert fail message
due to not enough memory.
Changed assert into error message "out of memory" and compiled in large
memory model to access more memory.
v1.3 to v1.4:
* bug fixed splitting midi format 0 did not write drum notes
* new midiio generated divide error (because mididrum does not read
sequential, which skips reading tempo track)
v1.4 to v1.5:
* added options -program, -drum, -both for better choice.